// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import './lib/css/mui.min.css'
import './lib/css/icons-extra.css'
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
import VueResource from 'vue-resource'
import infiniteScroll from 'vue-infinite-scroll'
import store from './store'
import axios from 'axios'
import moment from 'moment'
import VueCookies from 'vue-cookies'
Vue.use(VueCookies)

Vue.use(infiniteScroll)
Vue.use(MintUI)
Vue.use(VueResource)

Vue.filter('dateFormat', function (dateStr, pattern = "YYYY-MM-DD HH:mm:ss") {
  return moment(dateStr).format(pattern)
})

Vue.config.productionTip = false
Vue.http.options.root = 'http://maoyan.bluej.cn/ajax'
Vue.http.options.emulateJSON = true

/* eslint-disable no-new */
var myrequest = axios.create({
  baseURL: 'http://maoyan.bluej.cn/ajax'
})
Vue.prototype.axios = myrequest

new Vue({
  el: '#app',
  router,
  store,
  render: c => c(App)
})
